
import 'dart:async';

import 'package:flutter/services.dart';

class Umflutter {
  static const MethodChannel _channel =
      const MethodChannel('umflutter');

  static Future<bool> init(appKey,channel) async {
    return await _channel.invokeMethod('init',{
      "appKey":appKey,
      "channel":channel
    });
  }

  static Future<bool> pageStart(page) async {
    return await _channel.invokeMethod('pageStart',page);
  }

  static Future<bool> pageEnd(page) async {
    return await _channel.invokeMethod('pageEnd',page);
  }

  static Future<bool> exit() async {
    return await _channel.invokeMethod('exit');
  }

  static Future<bool> signOff() async {
    return await _channel.invokeMethod('signOff');
  }

  static Future<bool> signIn(id) async {
    return await _channel.invokeMethod('signIn',id);
  }

  static Future<bool> event(data) async {
    return await _channel.invokeMethod('event',data);
  }
}
